www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminModelCustomPage\D_chk_add_a_template.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>





<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->

<!--#include file=../../inc/ND_class_function.asp-->





<%
AJAXshowLoader()

%>

<%


if find_dataw("qitashezhi123","0",6)<>"1" and qx_if_max=0 then
response.redirect "../D_suodinguser.asp"
end if

%>

<%
session("newdsoft_selct_a_lable_bef_haved")=""
if trim(request("mbfname"))="" then

%>

<script language=javascript>

alert("请填写模板文件名!");

history.go(-1);


</script>






<%



else





eee1=trim(request("mbfname"))


extnm=lcase(mid(eee1,inStrRev(eee1,".")+1,len(eee1)-inStrRev(eee1,".")))


if extnm="asp" or extnm="aspx" or extnm="js" or extnm="css" or extnm="php"  or extnm="htm"   or extnm="html"   or extnm="shtml"  or extnm="jsp" then 




set filea=new Cls_FSO



ddddqq=huanyuan_textare_for_editor(request("Content"))



if filea.ReportFileStatus(server.mappath("../../templates/"&request("pname")&"/"&request("fpath")&trim(request("mbfname"))))=1 then


%>



<script language=javascript>

alert("有同名文件存在,无法添加!");

history.go(-1);


</script>



<%




else

call createfile("../../templates/"&request("pname")&"/"&request("fpath")&trim(request("mbfname")),ddddqq,1)






set rs1=server.CreateObject("adodb.recordset")
       
rs1.open "select * from ND_templates_folder_reg where id="&request("pid"),conn,1,1

if rs1("is_default_template")=true then



complie_dir="../adminKernel/"

cont222=replace_label_main(ddddqq,request("pname")&"/"&request("fpath")&trim(request("mbfname")))

call createfile("../../"&nd_web_output_folder&"/"&request("fpath")&trim(request("mbfname")),cont222,true)



end if

%>



<script language=javascript>

alert("添加成功!");

self.location="D_edit_admin_zi_templates.asp?pid=<%=request("pid")%>&fpath=<%=request("fpath")%>";


</script>



<%
end if


else
%>



<script language=javascript>

alert("模板文件名的 扩展名有错误,不是系统支持的 扩展名!");
history.go(-1);

</script>



<%



end if


end if
AJAXcloseLoader()
%>